<template>
	<view
		class="blcok-card"
		:style="{
			width: width,
			'min-width': width
		}"
	>
		<view class="title flex-cc">
			{{ data.name }}
		</view>
		<view class="flex-cc">
			<view class="value"> {{ data.value }}</view>
			<view class="unit"> {{ data.unit }}</view>
		</view>
		<view class="date flex-cc"> {{ data.date }}</view>
	</view>
</template>
<script>
	export default {
		name: '',
		props: {
			width: {
				type: String,
				default: () => '180rpx'
			},
			data: {
				type: Object,
				default: () => {
					return { name: '最高水位', value: '144.92', unit: 'mm', date: '2022-06-14 07:05:00' }
				}
			}
		},
		components: {},
		data() {
			return {}
		},
		methods: {},
		computed: {},
		mounted() {}
	}
</script>
<style lang="less" scoped>
	.blcok-card {
		// width: 168rpx;
		height: 185rpx;
		background: #ffffff;
		border: 1rpx solid #c6ddff;
		border-radius: 10rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
		padding: 10rpx 0;
		.title {
			// width: 119rpx;
			// height: 29rpx;
			text-align: center;
			background: #0085ff;
			border-radius: 20rpx;
			font-size: 22rpx;
			font-weight: 500;
			color: #fff;
			padding: 5rpx 15rpx;
			white-space: nowrap;
		}
		.value {
			color: #0085ff;
			font-size: 20rpx;
			font-weight: 600;
			font-size: 30rpx;
		}
		.unit {
			color: #0085ff;
			font-size: 20rpx;
			font-weight: 600;
			font-size: 28rpx;
		}
		.date {
			font-size: 20rpx;
			width: 100%;
			text-align: center;
			color: #959595;
		}
	}
</style>
